$(function (){
    $("button").click(function (){
        let name = $("#name").val();
        let content = $("textarea.name3").val();
        let time = $("input#times").val().toString().replace("T"," ");
        let type = $("#name2").val();
        if (content) {
            $.post(linkSaveNew, {
                name:name,
                time:time,
                type:type,
                content:content
            }, function (text) {
                alert(text);
                location.href=linkIndex;
            });
        }else {
            alert("清单内容不能为空");
        }
    });
});